package com.lj.oss.handler;

import com.aliyun.oss.OSSException;
import com.lj.utils.result.ResultCode;
import com.lj.utils.result.ResultVO;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author luojing
 * @version 1.0
 * @date 2021/4/23 18:20
 */
@RestControllerAdvice("com.lj.oss")
public class OSSExceptionHandler {

    @ExceptionHandler(OSSException.class)
    public ResultVO handler(OSSException e){
        return new ResultVO(ResultCode.BAD_REQUEST,"获取文件失败！");
    }
}
